/**
 * 
 */
package com.nervytech.tutorcruise.db.service.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.nervytech.tutorcruise.db.dao.interfaces.ITimezoneDAO;
import com.nervytech.tutorcruise.db.service.interfaces.ITimezoneService;
import com.nervytech.tutorcruise.service.exception.TrainerCruiseServiceException;

/**
 * @author ADMIN
 * 
 */
@Service("timezoneService")
public class TimezoneService implements ITimezoneService {

	@Autowired
	private ITimezoneDAO timezoneDAO;
	
	@Override
	public Map<Integer,String> getTimezonesMap() throws TrainerCruiseServiceException {
		Map<Integer,String> timezoneMap = new HashMap<Integer, String>();
		  
		try {
			timezoneMap = timezoneDAO.getTimezoneMap();
		} catch (Exception e) {
			e.printStackTrace();
			throw new TrainerCruiseServiceException(e.getMessage());
		}
		return timezoneMap;
	}

}
